<?php
$ch = curl_init("http://dict.cn/ws.php?utf8=true&q=apple");
$fp = fopen("example_homepage.txt", "w");

//一顿设置
curl_setopt($ch, CURLOPT_FILE, $fp);
//curl_setopt($ch, CURLOPT_HEADER, 0);
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

echo curl_exec($ch);
//echo curl_getinfo($ch);
curl_close($ch);
fclose($fp);

?>

